from rich.console import Console

console = Console()
colors = [
    "red",
    "green",
    "blue",
    "yellow",
    "magenta",  # 品红色
    "cyan",     # 青色
    # "white",
    "black",
    "purple",   # 紫色
    # 不支持
    # "gray",
    # "orange",
    # "pink",     # 粉色
]
for color in colors:
    console.print("this is a message", style=f"on {color}")

# 1. 关键字
console.print("this is a message", style="cyan on blue")

# 2. 16进制颜色
console.print("this is a message", style="#ffff00 on #ff00ff")
# 3. rgb颜色
console.print("this is a message",  style="rgb(50,50,200) on rgb(0,255,0)")
